package com.lzj.demo.design.template.fzw;

import lombok.extern.slf4j.Slf4j;

import java.util.HashMap;
import java.util.Map;

@Slf4j
public class TMALLNetMail extends NetMail{
    public TMALLNetMail(Long uid, String uPassword) {
        super(uid, uPassword);
    }

    @Override
    protected Boolean login(Long uid, String uPassword) {
        log.info("模拟淘宝用户登录 uid{},uPwd{}",uid,uPassword);
        return true;
    }

    @Override
    protected Map<String, String> reptile(String skuUrl) {
        log.info("淘宝 skuUrl:{}",skuUrl);
        Map<String,String> resultMap = new HashMap<>(1);
        resultMap.put("TMALL",skuUrl);
        return resultMap;
    }

    @Override
    protected String createBase64(Map<String, String> goodsInfo) {
        return goodsInfo.get("TMALL")+"的海报已生成";
    }
}
